<style>
<?php for ($i = 0; $i < count($this->priorityList); $i++) {?>
.priority_list [label = "<?=$this->priorityList[$i]['value']?>"]
{
	background:url(<?php echo $this->baseUrl().$this->priorityList[$i]['icon_url']?>) no-repeat;
}
<?php }?>
    #statesmod {position:relative;padding:1em;}
    #statesautocomplete {position:relative;margin:1em;width:15em;}/* set width of widget here*/
    #reporter {}
    #userscontainer {position:absolute;top:1.7em;width:25em;}
    #userscontainer .yui-ac-content {
		position:absolute;
		width:100%;
		height:11em;
		border:1px solid #404040;
		background:#fff;
		overflow:hidden;
		z-index:9050;
	}
    #userscontainer .yui-ac-shadow {position:absolute;margin:.3em;width:100%;background:#a0a0a0;z-index:9049;}
    #userscontainer ul {margin-top:0px;padding:0px 0;width:100%;}
    #userscontainer li {padding:0 0px;cursor:default;white-space:nowrap;}
    #userscontainer li.yui-ac-highlight {background:#000033;color:#ffffff}
</style>
<br>
<table width="90%" align="center" bgcolor="#bbbbbb" cellspacing="0" style="border:1px solid #bbbbbb">
<tr bgcolor="#f0f0f0">
	<td style="border-bottom:0px">
			<h3 style="margin:3px 0 0 5px;height:30px">Create Issue</h3>
			<div style = "margin-left:5px"><b>Step 2 of 2:</b> Enter the details of the issue...</div>
	</td>
</tr>
<tr>
<td bgcolor="#ffffff">
<?php
	echo $this->form;
?>
</td>
</tr>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $("#duedate").datepicker({"defaultDate":"2009\/10\/17"});
});

YAHOO.example.ACJSFunction = function(){
    var oACDS;
    var oAutoComp;

    return {
        init: function() {

            // Instantiate JS Function DataSource
			var oACDS = new YAHOO.util.XHRDataSource("<?=$this->baseUrl()?>/issue/users");
			oACDS.responseSchema = {
				resultsList: "items",
				fields: ["username", "fullname", "email",]
			};
			oACDS.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;

            // Instantiate AutoComplete
            oAutoComp = new YAHOO.widget.AutoComplete('reporter','userscontainer', oACDS);
            oAutoComp.alwaysShowContainer = false;
            oAutoComp.queryDelay = 0;
            oAutoComp.maxResultsDisplayed = 8;

            oAutoComp.formatResult = function(oResultItem, sQuery) {
                 var sMarkup = oResultItem[1] + " " + oResultItem[2] + " (" + oResultItem[0] +") ";
				return (sMarkup);
            };
			oAutoComp.doBeforeExpandContainer = function(oTextbox, oContainer, sQuery, aResults) {
				var pos = YAHOO.util.Dom.getXY(oTextbox);
				pos[1] += YAHOO.util.Dom.get(oTextbox).offsetHeight + 2;
				YAHOO.util.Dom.setXY(oContainer,pos);
				return true;
			};


        	},				
			// Subscribe to Custom Events
				//oAutoComp.dataReturnEvent.subscribe(YAHOO.example.ACJSFunction.myOnDataReturn);


        	// Define Custom Event handlers
        	myOnDataReturn: function(sType, aArgs) {
				var oAutoComp = aArgs[0];
				var sQuery = aArgs[1];
				var aResults = aArgs[2];
	
				if(aResults.length == 0) {
					oAutoComp.setBody("<div id=\"statescontainerdefault\">No matching results</div>");
				}
        }
    };
}();

YAHOO.util.Event.addListener(this,'load',YAHOO.example.ACJSFunction.init);
</script>